import axios from "axios";
import request from "@/utils/request";


const http = axios.create({
  timeout: 1000 * 30,
  withCredentials: true,
  headers: {
    "Content-Type": "application/json; charset=utf-8",
  },
});
export function policy() {
    let userJson = sessionStorage.getItem("user");
    let user = JSON.parse(userJson);
    const token = user.token;
    
  return new Promise((resolve, reject) => {
    http({
      url: "http://localhost:9876/oss/policy",
      headers:{
        "token":user.token  
      },
      method: "get",
    }).then(({ data }) => {
      resolve(data);
    });
  });
}
